import React from 'react'
// ===================================================================== global declare
const { $Lazy } = window
// ===================================================================== $Lazy
const Modal 	= $Lazy.state(()=>import('@antd/modal'))
// ===================================================================== component
class Index extends React.Component{
	state = {
		data: [],
		src:'',
		title:'',
		version:''
	}
	submit = {}
	open = (src,title,version)=> {
		this.setState({src,title,version})
		this.modal.open({formRef: this.formRef})
	}
	
	
	render(){
		const {src,title,version} = this.state
		return <Modal
					width 			= { '80%' }
					onRef			= { ref => this.modal = ref }
					title			= { `${title}（第${version}版）` }
					isFullScroll	= { true }
					noCancel
					noOk
				>
					<div className='wh'>
						<iframe title={title} src={src} width='100%' height='100%' />
					</div>
				</Modal>
	}
}

export default Index